﻿using System;
using System.Collections.Generic;
using System.Web;

namespace Directory.Web
{
	public class MessageBoardDataProxy
	{
		private MessageBoardDataProxy() { }

		public static IList<Directory.Model.MessageInfo> GetMessageList(bool isChecked, int pageIndex, int pageSize, out int totalRecords)
		{
			Directory.BLL.MessageBoard bll = new Directory.BLL.MessageBoard();
			return bll.GetMessageList(isChecked,pageIndex,pageSize,out totalRecords);
		}

		public static Directory.Model.MessageInfo CreateMessage(string title, string author, string content, string authorIp)
		{
			Directory.BLL.MessageBoard bll = new Directory.BLL.MessageBoard();
			return bll.CreateMessage(title, author, content, authorIp, false, 0);
		}

		public static Directory.Model.MessageInfo GetMessageInfo(int messageId)
		{
			Directory.BLL.MessageBoard bll = new Directory.BLL.MessageBoard();
			return bll.GetMessageInfo(messageId);
		}

		public static void ReplyMessage(int MessageId, string checker, string reply)
		{
			Directory.BLL.MessageBoard bll = new Directory.BLL.MessageBoard();
			bll.ReplyMessage(MessageId, checker, reply,true,0);
		}

		public static void DeleteMessage(int msgID)
		{
			Directory.BLL.MessageBoard bll = new Directory.BLL.MessageBoard();
			bll.DeleteMessage(msgID);
		}
	}
}